#version 430 core

#define GRID_SIZE_X 64.f
#define GRID_SIZE_Y 64.f

layout(location=0) in vec4 position;

layout(binding=0) uniform isampler2D nodeIndexTexture;

uniform mat4 viewProjMatrix;

void main(void)
{
	int mark = min(0,texelFetch(nodeIndexTexture, ivec2(position.xy * vec2(GRID_SIZE_X, GRID_SIZE_Y)), 0).x);
	gl_Position = viewProjMatrix * position + vec4(mark*100.f, 0.f, 0.f, 0.f);
}